package com.leo.oplayer.view;

/* import相关class */
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;

/* 实际跳出闹铃Dialog的Activity */
public class AlarmAlert extends Activity
{
  @Override
  protected void onCreate(Bundle savedInstanceState) 
  {
    super.onCreate(savedInstanceState);
    
    String contacts = this.getIntent().getStringExtra("contacts");    
    contacts = contacts==null?"":contacts;
    
    /* 跳出的闹铃警示  */
    new AlertDialog.Builder(AlarmAlert.this)
        .setTitle("温馨提示!!")
        .setMessage(contacts)
        .setPositiveButton("关掉他",
         new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface dialog, int whichButton)
          {
            /* 关闭Activity */
            AlarmAlert.this.finish();
          }
        })
        .show();
  } 
}
